<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>

<div class="content-reading-bottom" id="comment-1">
    <div class="content-reading-bottom-comment">
        <?php $this->comments()->to($comments); ?>
        <?php if ($comments->have()): ?>
        <h4 style="margin-left: 30px"><?php $this->commentsNum('暂时还没有评论哟，快来抢沙发吧', '当前只有一条评论，快来发表你的意见吧', '当前共%d条评论'); ?></h4>

    <?php $this->comments()->to($comments); ?>
    <?php while ($comments->next()): ?>


        <div class="content-reading-bottom-comment">
            <div style="margin: 30px 20px;">
                <dl>
                    <dd>
                        <img class="left-img" src="<?php $this->options->themeUrl('inc/img/logo.jpg'); ?>">
                        <div class="center-info">
                            <p style="font-size: 20px"<?php $comments->author(); ?></p>
                            <p style="font-size: 15px"><?php $comments->date('Y-m-d H:i'); ?></p>
                        </div>
                        <button class="right-btn"><a href="<?php $comments->responseUrl(); ?>">回复</a></button>

                    </dd>

                    <dd>
                        <hr style="margin: 10px" color="#eee">
                        <div style="margin-left: 75px">
                            <?php $comments->content(); ?>
                        </div>
                    </dd>
                </dl>
            </div>
            <?php endwhile; ?>

            <?php endif; ?>

            <?php if ($this->allow('comment')): ?>
            <div id="<?php $this->respondId(); ?>" class="respond">
                <div class="cancel-comment-reply">
                    <?php $comments->cancelReply(); ?>
                </div>

                <h4 style="margin-left: 30px">添加新评论</h4>
                <form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form">
                    <div class="content-reading-bottom-send-comment">
                        <div class="info">
                    <?php if ($this->user->hasLogin()): ?>
                        <p style="margin-left: 10px;color: #000"><?php _e('登录身份: '); ?><a style="color: #000;"
                                    href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>&nbsp;|
                            <a href="<?php $this->options->logoutUrl(); ?>" style="color: #000;" title="Logout"><?php _e('退出'); ?></a></p>
                    <?php else: ?>
                            <div class="bor">
                                <p>*称呼</p>
                                <p><input placeholder="User Name" type="text" name="author"></p>
                            </div>
                            <div class="bor">
                                <p>*邮箱</p>
                                <p><input placeholder="Email" type="text" name="mail"></p></div>
                            <div class="bor">
                                <p>网站:</p>
                                <p><input  placeholder="Web Site" type="text" name="url"></p>
                            </div>

                            <?php endif; ?>
                            <div class="bor">
                                <p>评论:</p>
                                <p><textarea placeholder="Input something..." type="text" name="text"></textarea></p>
                            </div>
                        </div>
                        <button class="btn">发表评论</button>
                    </div>
                </form>
            </div>
        </div>
    <?php else: ?>
        <h3><?php _e('评论已关闭'); ?></h3>
    <?php endif; ?>
    </div>

</div>
